# -*- coding=utf-8 -*-

from tools.decrypt_autohome_bbs import decrypt_autohome_bbs
from tools.decrypt_bbs_phantomjs import DecryptBBSPhantomJs

with open('test.html', 'r') as f:
    text = f.read()

# print(text)

dbp = DecryptBBSPhantomJs()
text = dbp.decrypt_autohome_bbs(text, div = '.tz-paragraph')
print(text)

with open('t.html', 'w') as f:
    f.write(text)